import {_decorator, Component, Label} from 'cc';

const { ccclass, property } = _decorator;

@ccclass('Combo')
export class Combo extends Component {
    @property(Label)
    label: Label = null;

    combo: number = 0;

    addCombo(combo: number = 1) {
        this.combo += combo;
        this.label.string = '连击x' + this.combo;
    }

    setCombo(newCount: number) {
        this.combo = newCount;
        this.label.string = '连击x' + this.combo;
    }
}


